/*
The surface-physics project: http://code.google.com/p/surface-physics/
Adds real world physics based on the Bullet physics engine, to bases in the Orbiter space
flight simulation software.

Written by Abhijit Nandy
License : Apache License 2.0

Bump_CraterRamp.h
Declares the Bump_CraterRamp class to create a ramp intelligently that allows vehicles
to cover the horizontal distance to the crater wall and also gain height, to finally escape from
the crater


TODO : This class should read the options section of an object from the physics file



*/


#pragma once

#include "../BulletBase/Bump_BaseObject.h"
#include "../Engine/Bump_MSHImporter.h"



/**
 * The Bump_Attachment to create and manage a BulletBase
 */
class Bump_CraterRamp : public Bump_BaseObject
{
	static Registrar registrar;

	//btRigidBody *rbCraterRamp;

	//Main Attachment point to a BulletBase(only 1 controlling BulletBase possible)
	ATTACHMENTHANDLE atVessel, atBase;


	Bump_MSHImporter mshObject;



public:
	static Bump_BaseObject * create() { return new Bump_CraterRamp; }

	Bump_CraterRamp();
	virtual ~Bump_CraterRamp();

	//Main control functions which are overidden from parent as they are called from Bump_BulletBase
	int		clbkSetClassCaps(Bump_BulletBase *bb, char *strObjName,  OBJHANDLE hObj = NULL);


	//Utility stuff
	int		createOrbiterPrimitives();
	int 	destroyOrbiterPrimitives();

	int		createBulletRigidBody();
	int		destroyBulletRigidBody();
	int		processCommand();


};
